<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">
<h:body>
	<ui:composition template="templates/commonPage.xhtml">
		<ui:define name="pagecontent">
			<h1>A world to learn</h1>
			<hr />

			<div class="search ui-state-default ui-corner-all">
				<div class="SearchesContent">
					<div class="searchtitle">Find your trip</div>
					<div class="div-searh search1">
						<span class="spanA">Activity</span>
						<h:form styleClass="searchE searchActivity">
							<h:selectOneMenu value="#{offersListMb.activityChoisie}"
								onchange="submit()"
								valueChangeListener="#{offersListMb.ValueChangeEventActivity}">
								<f:selectItems value="#{offersListMb.listActivityLabel}" var="a"
									itemValue="#{a}" itemLabel="#{a}" />
							</h:selectOneMenu>
						</h:form>
					</div>
					<div class="div-searh search2">
						<span class="spanB">Area</span>
						<h:form styleClass="searchE searchArea">
							<h:selectOneMenu value="#{offersListMb.paysChoisi}"
								onchange="submit()"
								valueChangeListener="#{offersListMb.ValueChangeEventCountry}">
								<f:selectItems value="#{offersListMb.listPays}" var="a"
									itemValue="#{a}" itemLabel="#{a}" />
							</h:selectOneMenu>
						</h:form>
					</div>
				</div>
				<div class="divCite">
					<blockquote class="cite">
						“The world is a book and those who do not travel read only one
						page. We live in a wonderful world that is full of beauty, charm
						and adventure. There is no end to the adventures we can have if
						only we seek them with our eyes open.<span class="quote">”</span>
						–
					</blockquote>
				</div>
			</div>

			<br style="clear: both" />
			<hr />
			<div class="buttoncart">
				<h:form styleClass="formcart">
					<h:commandButton
						styleClass="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-icon-left"
						action="#{shoppingCartMB.viewCart}" value="Check my cart"
						icon="ui-icon-check" style="margin-left:10px;" />
				</h:form>
			</div>
			<br style="clear: both" />
			<div class="row">
				<ui:repeat var="offer" value="#{offersListMb.listOffer}">
					<div class="span6 thumb-list">
						<h:form id="Form">
							<p:fieldset legend="#{offer.labelOffer}">
								<a rel="lightbox[secondary]"
									href="templates/img/thumb-small01.png"> <h:graphicImage
										value="#{offer.supplierOffer.description.miniPhotoDescription}" /></a>
								<h3>
									<p:commandLink
										value="#{offer.supplierOffer.activity.labelActivity}"
										action="offerDetails?faces-redirect=true"
										actionListener="#{offersListMb.getOfferDetails}">
										<f:attribute name="offerId" value="#{offer.idOffer}"></f:attribute>
									</p:commandLink>
								</h3>
								<p:commandLink
									value="#{offer.supplierOffer.description.textDescription}"
									action="offerDetails?faces-redirect=true"
									actionListener="#{offersListMb.getOfferDetails}">
									<f:attribute name="offerId" value="#{offer.idOffer}"></f:attribute>
								</p:commandLink>

								<br />
								<div class="divprice ui-button ui-state-default ui-corner-all">
									<span class="indivprice"> <h:outputText
											styleClass="priceNum"
											value=" #{(offer.rate.price.preTaxPrice*loginMB.taxChangeCoeff)} "
											converter="javax.faces.Integer">

											<f:convertNumber currencySymbol="$" integerOnly="true"
												type="number" groupingUsed="true" maxFractionDigits="2"
												pattern="##0.00" />
											<f:convertNumber pattern="#,###,##0.00" />
											<f:convertNumber type="currency" currencySymbol="$" />
										</h:outputText> <span><h:outputText value="#{loginMB.currency}" /></span> <span
										class="ati">ATI</span>
									</span>
								</div>

								<p:commandButton styleClass="cartButton"
									action="#{shoppingCartMB.addCart}" value="Add to cart"
									actionListener="#{shoppingCartMB.action}" icon="ui-icon-check"
									style="margin-left:10px;">
									<f:attribute name="offerId" value="#{offer.idOffer}" />
									<f:attribute name="costOffer"
										value="#{offer.rate.price.preTaxPrice}" />
									<f:attribute name="label" value="#{offer.labelOffer}" />
								</p:commandButton>

								<h:link outcome="createcomment" styleClass="comment"
									rendered="#{loginMB.userBu.connected}">Let a comment</h:link>
							</p:fieldset>
						</h:form>
					</div>
				</ui:repeat>
			</div>
			<br />
		</ui:define>
	</ui:composition>
</h:body>
</html>